package com.hks360.car_treasure.model;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by xiaote on 2016/4/11.
 */
public class CarLocation {

    /**
     * Date : 20160410
     * Time : 021915
     * Speed : 0000
     * Latitude : 29385182
     * Longitude : 106443773
     * Elevation : 00000120
     */

    private String Date;
    private String Time;
    private String Speed;
    private String Latitude;
    private String Longitude;
    private String Elevation;

    public static CarLocation objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), CarLocation.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setDate(String Date) {
        this.Date = Date;
    }

    public void setTime(String Time) {
        this.Time = Time;
    }

    public void setSpeed(String Speed) {
        this.Speed = Speed;
    }

    public void setLatitude(String Latitude) {
        this.Latitude = Latitude;
    }

    public void setLongitude(String Longitude) {
        this.Longitude = Longitude;
    }

    public void setElevation(String Elevation) {
        this.Elevation = Elevation;
    }

    public String getDate() {
        return Date;
    }

    public String getTime() {
        return Time;
    }

    public String getSpeed() {
        return Speed;
    }

    public String getLatitude() {
        return Latitude;
    }

    public String getLongitude() {
        return Longitude;
    }

    public String getElevation() {
        return Elevation;
    }
}
